powered by
Simulation of compositional data from mixtures of Dirichlet distributions.
rmixdiri(n, a, prob)
The sample size.
A matrix where each row contains the parameters of each Dirichlet disctribution.
A vector with the mixing probabilities.
A list including:
A numeric variable indicating the cluster of simulated vector.
A matrix containing the simulated compositional data. The number of dimensions will be + 1.
A sample from a Dirichlet mixture model is generated.
Ng Kai Wang, Guo-Liang Tian and Man-Lai Tang (2011). Dirichlet and related distributions: Theory, methods and applications. John Wiley & Sons.
Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.
rmixcomp, mixdiri.contour,
# NOT RUN { a <- matrix( c(12, 30, 45, 32, 50, 16), byrow = TRUE,ncol = 3) prob <- c(0.5, 0.5) x <- rmixdiri(100, a, prob) # }
Run the code above in your browser using DataLab